//package com.neuedu.config;
//
//import com.alibaba.cloud.commons.lang.StringUtils;
//import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
//import org.springframework.stereotype.Component;
//
//import javax.servlet.http.HttpServletRequest;
//
//@Component
//public class RequstOriginParserDefinition implements RequestOriginParser {
//    @Override
//    public String parseOrigin(HttpServletRequest httpServletRequest) {
//        String serviceName = httpServletRequest.getParameter("serviceName");
//        if(StringUtils.isEmpty(serviceName)){
//            throw new RuntimeException("serviceName is null");
//        }
//        return serviceName;
//    }
//
//}
